package com.tony.pmp.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: PmpMainApplication
 * @Auther: 皮蛋布丁
 * @Date: 2021/07/08/20:37
 * @Description:
 */
@SpringBootApplication
@MapperScan(basePackages = "com.tony.pmp.model.mapper") //扫描mybatis写动态sql的接口的包位置
//@EnableScheduling //定时任务调度
public class PmpMainApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(PmpMainApplication.class);
    }

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext run = SpringApplication.run(PmpMainApplication.class, args);
    }
}
